import 'package:flutter/material.dart';

class GridViewExample extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        //theme: ThemeData(primarySwatch: Colors.blue,),
        home: Scaffold(
            appBar: AppBar(
              title: Text('电影海报实例'),
            ),
            body: GridView(
              gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
                crossAxisCount: 3,
                mainAxisSpacing: 2.0,
                crossAxisSpacing: 2.0,
                childAspectRatio: 0.8,
              ),
              children: <Widget>[
                new Image.network(
                  "http://image.test.laodao.so/image/news/content/598a4e30-3383-11ea-b72b-15f836b446c5.jpeg",
                  fit: BoxFit.cover,
                ),
                new Image.network(
                  "http://image.test.laodao.so/image/news/content/2e564700-3383-11ea-b72b-15f836b446c5.jpg",
                  fit: BoxFit.cover,
                ),
                new Image.network(
                  "http://image.test.laodao.so/image/news/content/598a4e30-3383-11ea-b72b-15f836b446c5.jpeg",
                  fit: BoxFit.cover,
                ),
                new Image.network(
                  "http://image.test.laodao.so/image/news/content/2e564700-3383-11ea-b72b-15f836b446c5.jpg",
                  fit: BoxFit.cover,
                ),
                new Image.network(
                  "http://image.test.laodao.so/image/news/content/2e564700-3383-11ea-b72b-15f836b446c5.jpg",
                  fit: BoxFit.cover,
                ),
                new Image.network(
                  "http://image.test.laodao.so/image/news/content/598a4e30-3383-11ea-b72b-15f836b446c5.jpeg",
                  fit: BoxFit.cover,
                ),
                new Image.network(
                  "http://image.test.laodao.so/image/news/content/2e564700-3383-11ea-b72b-15f836b446c5.jpg",
                  fit: BoxFit.cover,
                ),
                new Image.network(
                  "http://image.test.laodao.so/image/news/content/598a4e30-3383-11ea-b72b-15f836b446c5.jpeg",
                  fit: BoxFit.cover,
                ),
                new Image.network(
                  "http://image.test.laodao.so/image/news/content/598a4e30-3383-11ea-b72b-15f836b446c5.jpeg",
                  fit: BoxFit.cover,
                ),
                new Image.network(
                  "http://image.test.laodao.so/image/news/content/2e564700-3383-11ea-b72b-15f836b446c5.jpg",
                  fit: BoxFit.cover,
                ),
                new Image.network(
                  "http://image.test.laodao.so/image/news/content/598a4e30-3383-11ea-b72b-15f836b446c5.jpeg",
                  fit: BoxFit.cover,
                ),
                new Image.network(
                  "http://image.test.laodao.so/image/news/content/2e564700-3383-11ea-b72b-15f836b446c5.jpg",
                  fit: BoxFit.cover,
                ),
                new Image.network(
                  "http://image.test.laodao.so/image/news/content/2e564700-3383-11ea-b72b-15f836b446c5.jpg",
                  fit: BoxFit.cover,
                ),
                new Image.network(
                  "http://image.test.laodao.so/image/news/content/598a4e30-3383-11ea-b72b-15f836b446c5.jpeg",
                  fit: BoxFit.cover,
                ),
                new Image.network(
                  "http://image.test.laodao.so/image/news/content/2e564700-3383-11ea-b72b-15f836b446c5.jpg",
                  fit: BoxFit.cover,
                ),
                new Image.network(
                  "http://image.test.laodao.so/image/news/content/598a4e30-3383-11ea-b72b-15f836b446c5.jpeg",
                  fit: BoxFit.cover,
                ),
              ],
            )));
  }
}
